from . import flutter

TextStyle = flutter.TextStyle
Container = flutter.Container
Center = flutter.Center
Text = flutter.Text
Stack = flutter.Stack
Row = flutter.Row
Positioned = flutter.Positioned
Transform = flutter.Transform
LinearGradient = flutter.LinearGradient
Colors = flutter.Colors
TextAlign = flutter.TextAlign
EdgeInsets = flutter.EdgeInsets
FontWeight = flutter.FontWeight
FontStyle = flutter.FontStyle
BoxShadow = flutter.BoxShadow
BoxShape = flutter.BoxShape
RichText = flutter.RichText
TextSpan = flutter.TextSpan
TextOverflow = flutter.TextOverflow
BorderRadius = flutter.BorderRadius
Offset = flutter.Offset
Scaffold = flutter.Scaffold
AppBar = flutter.AppBar
IconButton = flutter.IconButton
Icon = flutter.Icon
Icons = flutter.Icons
MaterialBanner = flutter.MaterialBanner
# CircleAvatar = flutter.CircleAvatar
FlatButton = flutter.FlatButton
TextButton = flutter.TextButton
OutlinedButton = flutter.OutlinedButton
ContainedButton = flutter.ContainedButton
Column = flutter.Column
Card = flutter.Card
ListTile = flutter.ListTile
ButtonBar = flutter.ButtonBar
FlatButton = flutter.FlatButton
MainAxisAlignment = flutter.MainAxisAlignment
# ListView = flutter.ListView
PopupMenuButton = flutter.PopupMenuButton
# PopupMenuEntry = flutter.PopupMenuEntry
# BuildContext = flutter.BuildContext
PopupMenuItem = flutter.PopupMenuItem
PopupMenuDivider = flutter.PopupMenuDivider
PaginatedDataTable = flutter.PaginatedDataTable
CheckBox = flutter.CheckBox
DisabledCheckBox = flutter.DisabledCheckBox
ChoiceChip = flutter.ChoiceChip
RadioButton = flutter.RadioButton
Chip = flutter.Chip
TabButton = flutter.TabButton
TabBar = flutter.TabBar
DataTable = flutter.DataTable
AlertDialog = flutter.AlertDialog
Button = flutter.Button
Children = flutter.Children

def test():
    return Scaffold(
        appBar=AppBar(
            title=Text('Chips'),
            leading=Icon(Icons.arrow_back, href="http://localhost:8000/web/_main_.html"),
            actions=[
                Icon(Icons.refresh, href="chips.html"),
            ],
        ),

        body=Children(
            children=[
                Column(
                    children=[
                        Positioned(
                            child=Center(
                                children=[
                                    Row(
                                        children=[
                                            Chip(
                                                thumbnail=Icon(Icons.directions_bike),
                                                text=Text('Biking'),
                                                remove=True
                                            ),
                                            Chip(
                                                thumbnail=Icon(Icons.navigation),
                                                text=Text('Portland'),
                                                remove=True
                                            ),
                                        ]
                                    ),
                                ]
                            ),
                            left=30,
                            top=70
                        ),
                        Positioned(
                            child=Center(
                                children=[
                                    Row(
                                        children=[
                                            Chip(Text('Elevator'), filter=True),
                                            Chip(Text('Fireplace'), filter=True),
                                            Chip(Text('Cats'), filter=True),
                                        ]
                                    ),
                                ]
                            ),
                            left=24,
                            top=200
                        ),
                    ]
                ),
            ]
        ),
    )

def run_app():
    test_ = test()
    javascript.document.body.appendChild(test_.render())

run_app()